<template>
  <div id="qrcode" ></div>
</template>
<script>
import QRCode  from "qrcodejs2"
import {isWeiXin} from '@/utils/app'

export default {
  data(){
    return {
      show: false
    }
  },
  components: { QRCode },
  mounted: function () {
      this.$nextTick(function () {
        this.qrcode();
      })
  },
  methods: {
    qrcode () {
      let qrcode = new QRCode('qrcode', {
        width: 180,
        height: 180,        // 高度
        text:  1
      })
    }
  }
}

</script>
<style>
#qrcode img{ margin: 20px auto}
</style>